﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.IO;

namespace WebMotel.print
{
    public partial class Print : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            StreamReader t = File.OpenText(Server.MapPath("/print/comanda.txt"));
            txt.Text = t.ReadToEnd();
            t.Close();

            String s = "<script language='javascript'> window.print(); </script>";
            Page.RegisterClientScriptBlock("Print", s);

            //String c = "<script language='javascript'> self.close(); </script>";
            //Page.RegisterClientScriptBlock("Close", c);
        }

    }
}